1. Field of the Invention
The present invention relates to a numerical controller for controlling a five-axis machining apparatus having three linear axes and two rotary axes for machining a workpiece mounted on a table.
2. Description of Related Art
To machine a workpiece by a five-axis machining apparatus, the following machining technique has generally been utilized. That is, upon reception of a motion command indicating a motion path for a tool end point and a tool orientation, an interpolation is performed on the motion path for the tool end point based on a commanded relative motion velocity between workpiece and tool, and the tool orientation is also interpolated. As a result, the tool end point moves along the commanded motion path at a commanded velocity, with the tool orientation changing (see, JP2003-195917A, JP2005-174010A, and JP2005-182437A). The above described command and machining technique are called tool end point control, and program commands are prepared by using a CAM.
JP 2003-195917A discloses a technique in which a motion path for a tool end point and a tool orientation in a motion command are interpolated based on a relative motion velocity between workpiece and tool, and interpolation points of the motion path are corrected, thereby driving servomotors to move the tool end point along the commanded motion path at a commanded velocity.
JP2005-174010A discloses a technique for preparing an NURBS curve based on commands for two rotary axes.
JP2005-182437A discloses a technique in which based on a point sequence that represents a commanded motion path of a tool end point and a vector sequence that represents a commanded tool orientation, an interpolation is performed to change a machining point along a curve generated according to the commanded point sequence and change a vector end point indicating the tool orientation along a curve generated according to the commanded vector sequence.
As described above, program commands for use by a numerical controller for tool end point control of a five-axis machining apparatus are prepared by a CAM.
The following is a description of an ordinary method for generating program commands by use of a CAM. A curved surface to be machined shown in FIG. 1 is divided into sections called triangular patches as shown in FIG. 2. A tool locus is calculated on the triangular patches as shown in FIG. 3, thereby preparing program commands with blocks each of which is defined by intersections of the tool locus and sides of triangular patches concerned, as shown in FIG. 4.
The triangular patches are prepared to have an allowable tolerance with respect to the curved surface to be machined. Since the path of the tool end point is on triangular patches as shown in FIG. 4, the path of the tool end point is smooth within the allowed tolerance, if the curved surface to be machined is smooth. The tool orientation is prepared to extend in a direction perpendicular to the prepared triangular patches. At each of boundaries between triangular patches concerned, the tool orientation is generally determined using an average between the vertical directions of two corresponding triangular patches.
The tool orientation can therefore largely change at a block in which the path of the tool end point is short in length, as shown in FIG. 5 which is a cross section taken along the tool path. Specifically, in some cases, the tool orientation does not change in proportion to the length indicated by a linear axis command, i.e., the length of a motion path of the tool end point, but largely changes as shown in FIG. 5.
If such program commands are executed, deceleration and acceleration are repeated due to a change in velocity of a rotary axis, posing a problem that the machined shape becomes rough and the machining time becomes long. Such a problem occurs depending on the machined shape and the type of CAM used.